﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetDetalleOrdenCompraByIdOrdenCompra')
	BEGIN
		DROP  Procedure  GetDetalleOrdenCompraByIdOrdenCompra
	END

GO

CREATE Procedure GetDetalleOrdenCompraByIdOrdenCompra

	(
		@idOrdenCompra int
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[Cantidad],
	[IdBien],
	[IdOrdenCompra],
	[Monto] 
	FROM [DetalleOrdenCompra] 
	WHERE [IdOrdenCompra] = @idOrdenCompra

	SET NOCOUNT OFF
END


GO


GRANT EXEC ON GetDetalleOrdenCompraByIdOrdenCompra TO PUBLIC

GO

